package com.qian.service.ddj.entity;

import com.yaowk.service.common.BaseEntity;
import com.yaowk.service.common.GeneratorNote;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Version;
import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@ToString
@Entity
@DynamicInsert
@DynamicUpdate
public class DdjAliCode extends BaseEntity<Long> {

    @GeneratorNote("商户id")
    private Integer businessId;
    @GeneratorNote("备注")
    @Column(unique = true)
    private String remark;
    @GeneratorNote("二维码")
    private String qrCode;
    @GeneratorNote("状态")
    @ColumnDefault("1")
    private Byte status;
    @GeneratorNote("金额")
    private BigDecimal amount;
    @CreationTimestamp
    private Date useTime;
    @Version
    private Long version;
}
